package com.suixinsanren.design.factory.demo.demo01;

import java.util.ArrayList;

public abstract class Pizza {

    protected String name;
    protected String dough;
    protected String sauce;
    protected ArrayList toppings = new ArrayList();

    public void prepare() {
        System.out.println("准备：" + name);
        System.out.println("搅拌面团...");
        System.out.println("加酱汁...");
        System.out.println("添加配料...");
        toppings.forEach(System.out::print);
    }

    void bake() {
        System.out.println("bake for 25 minutes at 50");
    }

    void cut() {
        System.out.println("把披萨切成对角线的薄片");
    }

    void box() {
        System.out.println("将披萨放入官方披萨盒中");
    }

    public String getName() {
        return name;
    }
}
